/******************************************************************************************
 * 
 * Simulate the syscall funtions in source process' platform by invoking the native syscall
 * function. There the <code>operator ()</code> is redirected.
 *
 ******************************************************************************************/
#ifndef MIPSSYSCALL_H
#define MIPSSYSCALL_H
#include "crossbit/common.h"
#include "crossbit/SyscallHandler.h"
#include "crossbit/SignalRegister.h"

namespace crossbit {

    class ProcessorState;
    class MemoryImage;
	class SignalRegister;

    // class SStrixSyscall emulate the SimpleScalar SStrix (a derivative of 
    // Ultrix) syscall.

    class MIPSSyscallHandler : public SyscallHandler {
        public:
            // Initialze SStrixSyscall with machine state, including
            // processor state and memory image
            MIPSSyscallHandler(ProcessorState *state, MemoryImage *img, SignalRegister *rg);
            ~MIPSSyscallHandler();
            // the actual handling function
            virtual void operator () ();

            int syscode();

    };

}
#endif
